'''
递归思路
'''

# def fun(n):
#    if n == 0 or n == 1:
#        return 1
#    else:
#        return   n * fun(n-1)
#
# sum = 0
# for i in range(1,6):
#     sum = sum + fun(i)
# print(sum)

'''
倒着看 rang(5,1,-1)是 5,4,3,2 
2*1+1
3*(2*1+1)+1
'''
sum = 1
for i in range(5,1,-1):
    sum = i * sum +1
print(sum)

